package com.codeplex.kartbazi;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;

public class CardGameActivity extends Activity implements AnimationListener, View.OnClickListener {

    ImageView androidCard;
    ImageView userCard;
    Animation anim;
    String CardType = "0";//indicate card type
    // 0 : machine
    // 1 :
    // 2 :

    /**
     * Called when the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        setContentView(R.layout.main);
        Bundle extras = getIntent().getExtras();
        CardType = extras != null ? extras.getString("type") : "0";
        //set OnClickListener
        RelativeLayout row1_layout = (RelativeLayout) findViewById(R.id.Row1);
        row1_layout.setOnClickListener(this);
        RelativeLayout row2_layout = (RelativeLayout) findViewById(R.id.Row2);
        row2_layout.setOnClickListener(this);
        RelativeLayout row3_layout = (RelativeLayout) findViewById(R.id.Row3);
        row3_layout.setOnClickListener(this);
        RelativeLayout row4_layout = (RelativeLayout) findViewById(R.id.Row4);
        row4_layout.setOnClickListener(this);
        RelativeLayout row5_layout = (RelativeLayout) findViewById(R.id.Row5);
        row5_layout.setOnClickListener(this);
        RelativeLayout row6_layout = (RelativeLayout) findViewById(R.id.Row6);
        row6_layout.setOnClickListener(this);

        //Typeface font = Typeface.createFromAsset(getAssets(), "yourfont.ttf");
        //anim = AnimationUtils.loadAnimation(getApplicationContext(),
        //R.anim.slide_down);


    }

    @Override
    public void onAnimationStart(Animation animation) {

    }

    @Override
    public void onAnimationEnd(Animation animation) {

    }

    @Override
    public void onAnimationRepeat(Animation animation) {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.Row1:
                //attribute 1
                break;
            case R.id.Row2:
                //attribute 2
                break;
            case R.id.Row3:
                //attribute 3
                break;
            case R.id.Row4:
                //attribute 4
                break;
            case R.id.Row5:
                //attribute 5
                break;
            case R.id.Row6:
                //attribute 6
                break;
            default:
                break;

        }
    }
}